Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script interface instead of cli tool. BREAKING #23

Merged
merged 21 commits into from
Oct 3, 2023
Merged

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Oct 2, 2023

This PR is a complete redo of how MEDYANSimRunner is used. Before, it was installed as a command line tool. Now it is just a regular Julia package inspired by how build scripts work in BinaryBuilder.jl.

To upgrade inputs to this new version do the following:

  1. Add import MEDYANSimRunner to the start of main.jl and add MEDYANSimRunner to the input environment.
  2. Add the vector of jobs to run to main.jl, for example, jobs = ["a", "b", "c",]. This should contain what used to be in jobnames.txt.
  3. Add abspath(PROGRAM_FILE) == @__FILE__ && MEDYANSimRunner.run_sim(ARGS; jobs, setup, loop, load_snapshot, save_snapshot, done) to the very end of main.jl

To run the simulation, instead of:

medyansimrunner run input output jobnames.txt 3

Do:

julia --project=input -e 'using Pkg; Pkg.instantiate();'
JULIA_LOAD_PATH="@" julia --project=input --startup-file=no input/main.jl --out=output --batch=3 --continue

The output of the simulation is also very different. There is no more list.txt. Instead extra metadata has been added to each snapshot, which is now stored in the traj output subdirectory in snap$(step).zarr.zip files, along with header.json and a new footer.json. Because of this extra metadata, the ZGroup returned by save_snapshot which used to be the root of the snap$(step).zarr.zip files has been moved to the "snap" subgroup.

@nhz2 nhz2 changed the title Script interface. Make script interface instead of cli tool. BREAKING Oct 3, 2023
@nhz2 nhz2 changed the title Make script interface instead of cli tool. BREAKING Script interface instead of cli tool. BREAKING Oct 3, 2023
@nhz2 nhz2 requested a review from Leibniz1697 October 3, 2023 15:15
@nhz2 nhz2 merged commit 15ab802 into main Oct 3, 2023
6 of 9 checks passed
@nhz2 nhz2 deleted the remove-CLI-take-2 branch October 3, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant